<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>创业者服务首页</title>
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="../css/video-js.css">
    <link rel="stylesheet" href="../css/leftSidebar.css">
</head>
<style type="text/css">
    html,body{height: 100%;}
    .col-xs-12.nav_right{padding: 0;height: 100px;padding-right: 0;margin-right: 0;min-width: 1100px;height: 100px;padding-right: 0;margin-right: 0;padding-left: 160px;}
    #myTab a{color: #7c7c7c; font-size: 15px;}
    #myTab>li.active>a{color: #3f4142; background-color: #fff;}
    .navbar-form{margin-top: 0;}
    .tab_creat .active{color:#6bc50d;}
    .table>tbody>tr.active>td, .table>tbody>tr.active>th, .table>tbody>tr>td.active, .table>tbody>tr>th.active, .table>tfoot>tr.active>td, .table>tfoot>tr.active>th, .table>tfoot>tr>td.active, .table>tfoot>tr>th.active, .table>thead>tr.active>td, .table>thead>tr.active>th, .table>thead>tr>td.active, .table>thead>tr>th.active{background-color: #fff;}
    .table>tfoot>tr.active>td{background-color: #fff;}
    .table>tbody>tr>td{border-top:0;}
    .table{margin-bottom: 0;}
    div.tab_creat.row{background-color: #fff;}
    .tab_font{padding: 10px 0;}
    .tab_font div,.tab_font td{font-size: 14px;color: #919191;}
    .gongsi_list div.col-xs-2,.gongsi_list div.col-xs-1,.gongsi_list div.col-xs-4{text-align: center;padding: 20px 0;}
    .gongsi_list.row{background-color: #fff;margin-top: 20px;}
    .gongsi_list dd div.col-xs-2{font-size: 14px;color: #4f5051;}
    .row{margin: 0;}
    .sub_logo{position: relative;display: inline-block;padding-left: 0;}
    .sub_logo input{opacity: 0;position: absolute;left: 0;right: 0;bottom: 0;top: 0;}
    .zhube_head{border-bottom: 1px solid #ddd;}
    .zhube_head h3{padding: 5px 0;, color: #222c38;font-size: 16px;border-bottom: 4px solid #5a626d;}

    #form_test label{font-size: 14px; color: #515151;font-weight: normal;}
    #form_test  .media-middle{font-size: 14px;color: #acacac;}
    .form_tip{font-size: 12px;color: #acacac; }
    .btn-default{border-color: #d4252a;color: #d4252a;}
    .btn-default.disabled{background-color: #ccc;color: #fff;border-color:#ccc;}
    .btn-default.disabled.focus, .btn-default.disabled:focus, .btn-default.disabled:hover, .btn-default[disabled].focus, .btn-default[disabled]:focus, .btn-default[disabled]:hover, fieldset[disabled] .btn-default.focus, fieldset[disabled] .btn-default:focus, fieldset[disabled] .btn-default:hover{background-color: #ccc;color: #fff;}
    .label.label-danger{color: #d5272d;background-color: #ffe6e7 ;font-weight: normal;}
    .media-body p{padding: 20px 0;}
    .xq_bg{background-color: #fff;padding: 20px 0;}

    /*详情界面*/
    #navbar-example{border: 0;background-color: #fff;}
    #navbar-example .nav-pills>li.active>a{border-bottom: 4px solid #d5272d; background-color: #fff;border-radius: 0;color: #222c38;}
    #navbar-example .nav-pills>li>a{font-size: 22px;color: #5a626d;}
    .progress_jieshao h4{font-size: 22px;border-left: 4px solid #222c38;padding: 0 10px;margin-top: 20px;}
    h4>button{float:right;padding: 2px 12px!important;}
    .progress_jieshao p{font-size: 18px;color: #5a626d;line-height: 30px;padding:0 10px;}
    .progress_jieshao section{font-size: 18px;color: #5a626d;padding: 0 10px;}
    .panel_name{font-size: 16px; color: #969fa8;padding: 0 10px;}
    .panne_exp ul>li{margin: 20px 0;}
    .panne_exp ul>li:last-child{margin-top: 10px;}
    .panel-title{font-size: 24px;color: #222c38;font-weight: bold;}
    .extra{padding: 10px 10px 15px 10px;}
    .extra>span:nth-child(1){font-weight: bolder;font-size:16px;margin-right:50px;}
    .extra>span:nth-child(2){color:#969fa8;margin-right:50px;}
    .extra>span:nth-child(3){color:#6bc50d;}
    .star{margin: 10px 0px;}
    .star>span{color:#969fa8;margin-left: 10px;}
    textarea{width:100%;background:#f5f5f5;border-color: #ddd;padding:20px 10px;}
</style>
<body style="background-color: #f2f2f2;">
<div class="row warp" style="height: 100%;">
    <div class="nav_right_head">
        <a href="../index.html"><img src="../img/roleIndexBg.jpg" onerror="onErrorHandle(this)"/></a>
    </div>
    <!--左侧导航-->
    <div class="col-xs-2 nav_left">
        <div class="creatNav">投资人服务</div>
        <div class="creatLoginStatus"><img src="../img/avtar.png"><a>您好，投资人</a></div>
        <div class="list-group" style="padding: 0;">
            <a href="touziren_index.html" class="list-group-item active"><i class="glyphicon glyphicon-home"></i> 首页</a>
            <a href="touziren_renzheng.html" class="list-group-item"><i class="glyphicon glyphicon-education"></i> 投资人认证</a>
            <a href="touziren_tjxm.html" class="list-group-item"><i class="glyphicon glyphicon-folder-open"></i> 推荐的项目</a>
            <a href="touziren_tzxm.html" class="list-group-item"><i class="glyphicon glyphicon-usd"></i> 投资的项目</a>
            <a href="touziren_mynews.html" class="list-group-item" ><i class="glyphicon glyphicon-book"></i> 我的消息</a>
            <a href="touziren_lydt.html" class="list-group-item"><i class="glyphicon glyphicon-search"></i> 项目搜索</a>
        </div>
        <div class="backBtn"> <a href="../index.html"><img src="../img/backIndex.png"></a></div>
    </div>

    <div class="col-xs-12 nav_right">


        <div class="row">
            <div class="xq_bg" style="">

                <div class="row">
                    <div class="col-xs-6 col-xs-offset-1">
                        <div class="media">
                            <div class="media-left">
                                <a href="#">
                                    <img class="media-object Pblogo" src="../img/020.jpg" onerror="onErrorHandle(this)" style="width: 140px;height: 140px;" alt="">
                                </a>
                            </div>
                            <div class="media-body pbIntroduce">
                                <h4 class="media-heading" style="padding-top: 20px;">小橙科技 <small>互联网·广东省·2006年</small></h4>
                                <p>移动互联网创业平台</p>


                            </div>
                        </div>
                    </div>

                    <div class="col-xs-3 col-xs-offset-1" style="padding-right: 0;">
                        <div class="panel panel-default">
                            <div class="panel-heading text-center">上轮获投</div>
                            <dl class="text-center row" style="padding: 10px;">
                                <dt><div class="col-xs-6">C轮</div><div class="col-xs-6">￥2000万</div></dt>
                                <dd><div class="col-xs-6">轮次</div><div class="col-xs-6">金额</div></dd>
                            </dl>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <nav id="navbar-example" class="navbar navbar-default navbar-static" role="navigation">
            <div class="row">
                <div class="bs-js-navbar-scrollspy col-xs-10 col-xs-offset-1">
                    <ul class="nav nav-pills navbar-left">
                        <li class="active"><a href="#introduce">项目介绍</a></li>
                        <li><a href="#experience">融资经历</a></li>
                        <li><a href="#suggest">导师建议</a></li>
                        <li><a href="#progress">相似项目</a></li>
                    </ul>
                    <div class="navbar-right">
                        <button class="btn btn-default attentionPb" data-toggle="modal" data-target="#myModal" >投资</button>
                    </div>

                </div>

            </div>

        </nav>

        <div class="col-xs-10 col-xs-offset-1">

            <div data-spy="scroll" data-target="#navbar-example" data-offset="0"
                 style=" position: relative;">
                <div class="panel panel-default progress_jieshao">
                    <div class="panel-heading">
                        <h3 class="panel-title" id="introduce">项目介绍 <small>（非熠星项目）</small> <small>（审核已通过）</small></h3>
                    </div>
                    <div class="panel-body">
                        <ul class="list-unstyled " id="pbDetailList">
                            <li>
                                <h4>概述</h4>
                                <p>使用Max是一个自制内容、自运营内容打造自有IP的公司。使用Max是一个自制内容、自运营内容打造自有IP的公司。使用Max是一个自制内容、自运营内容打造自有IP的公司。</p>
                                <div class="panel_name">公司全称：<span>小橙科技有限公司</span></div>
                            </li>
                            <li>
                                <h4>详细介绍</h4>
                                <section>产品服务</section>
                                <p>使用Max是一个自制内容、自运营内容打造自有IP的公司。使用Max是一个自制内容、自运营内容打造自有IP的公司。使用Max是一个自制内容、自运营内容打造自有IP的公司。</p>
                            </li>
                            <li>
                                <h4>团队人数</h4>
                                <section>5</section>
                            </li>
                            <li>
                                <h4>技术关键字</h4>
                                <section> 大数据</section>
                            </li>
                            <li>
                                <h4>融资阶段</h4>
                                <section>未融资</section>
                            </li>
                            <li>
                                <h4>商业计划书</h4>
                                <section> <a href="###">点击下载</a></section>
                            </li>
                        </ul>



                    </div>
                </div>

                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title" id="experience">融资经历</h3>
                    </div>
                    <div class="panel-body panne_exp">
                        <ul class="row list-unstyled">
                            <li class="col-xs-3">
                                2017-3-18
                            </li>
                            <li class="col-xs-3">
                                <b>C轮</b>
                            </li>
                            <li class="col-xs-3" style="">
                                <div>投资金额：<span>2000万人民币</span></div>
                                <div>投资方：<span>喜中投资基金</span></div>
                            </li>
                        </ul>
                        <ul class="row list-unstyled">
                            <li class="col-xs-3">
                                2017-3-18
                            </li>
                            <li class="col-xs-3">
                                <b>C轮</b>
                            </li>
                            <li class="col-xs-3" style="">
                                <div>投资金额：<span>2000万人民币</span></div>
                                <div>投资方：<span>喜中投资基金</span></div>
                            </li>
                        </ul>

                    </div>
                </div>

                <!-- 导师建议 -->
                <div class="panel panel-default progress_jieshao" id="tutorSuggest">
                <div class="panel-heading">
                    <h3 class="panel-title" id="suggest">导师建议</h3>
                </div>
                <div class="panel-body">
                    <h4>历史评分<button class="btn btn-default hidden">保存</button></h4>
                    <div class="extra"><span>7.5</span><span>2017-03-02</span><span>导师:陈西军</span></div>
                    <p>使用Max是一个自制内容、自运营内容打造自有IP的公司。使用Max是一个自制内容、自运营内容打造自有IP的公司。使用Max是一个自制内容、自运营内容打造自有IP的公司。</p>
                    <div class="hidden">
                        <h4>当前评分</h4>
                        <p class="star">请给项目打分:<span>10分</span></p>
                        <div>
                            <textarea name="name" rows="8" cols="80" placeholder="请输入您对该项目的意见或建议,1000字以内"></textarea>
                        </div>

                    </div>

                </div>
            </div>

                <!--我的项目-->
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title " id="progress">相关项目</h3>
                    </div>
                    <div class="panel-body" style="padding: 0;">
                        <div class="row gongsi_list">
                            <dl style="background-color: #fff;">
                                <dt>
                                <div class="row">
                                    <div class="col-xs-4" style="text-align: left;padding-left: 15px;">创业公司</div>
                                    <div class="col-xs-2">融资阶段</div>
                                    <div class="col-xs-2">创业领域</div>
                                    <div class="col-xs-1">导师</div>
                                    <div class="col-xs-2">过往投资方</div>
                                    <div class="col-xs-1">操作</div>

                                </div>
                                </dt>
                                <dd>
                                    <div class="row">
                                        <div class="col-xs-4" style="padding-top: 10px;">
                                            <div class="media">
                                                <div class="media-left media-middle" style="padding: 0px 15px;">
                                                    <img src="../img/carous.png" onerror="onErrorHandle(this)" style="width: 40px;height: 40px;"/>
                                                </div>
                                                <div class="media-body text-left">
                                                    <span style="display: inline-block;margin-top: 10px;">小橙科技</span>

                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-xs-2">201703024</div>
                                        <div class="col-xs-2">生活消费</div>
                                        <div class="col-xs-1">哈哈哈</div>
                                        <div class="col-xs-2">无</div>
                                        <div class="col-xs-1">哈哈</div>


                                    </div>

                                </dd>
                                <dd>
                                    <div class="row">
                                        <div class="col-xs-4" style="padding-top: 10px;">
                                            <div class="media">
                                                <div class="media-left media-middle" style="padding: 0px 15px;">
                                                    <img src="../img/carous.png" onerror="onErrorHandle(this)" style="width: 40px;height: 40px;"/>
                                                </div>
                                                <div class="media-body text-left">
                                                    <span style="display: inline-block;margin-top: 10px;">小橙科技</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-xs-2">201703024</div>
                                        <div class="col-xs-2">生活消费</div>
                                        <div class="col-xs-1">哈哈哈</div>
                                        <div class="col-xs-2">无</div>
                                        <div class="col-xs-1">哈哈</div>
                                    </div>
                                </dd>

                            </dl>

                        </div>
                    </div>
                </div>


            </div>

        </div>

    </div>
</div>



<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">投资流程</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="form_test1" style="padding: 20px 0;">
                    <div class="form-group">
                        <label for="money" class="col-sm-3 control-label"><span class="xiangmuInfo">*</span>投资金额</label>
                        <div class="col-sm-8">
                            <input type="number"  name='money' class="form-control" id="money" placeholder="请输入投资金额" nullmsg="投资金额！" datatype='*'>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="stage" class="col-sm-3 control-label"><span class="xiangmuInfo">*</span>项目阶段</label>
                        <div class="col-sm-8">
                            <select class="form-control" id="stage" name="stage" value="" >

                            </select>
                        </div>
                    </div>
                </form>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" id="investPb" data-dismiss="modal">确认</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
</body>
<script src="../js/jquery-2.1.1.min.js"></script>
<script src="../js/jquery.media.js"></script>
<script src="../js/videojs-ie8.min.js"></script>
<script type="text/javascript" src="../js/bootstrap.min.js" ></script>
<script type="text/javascript" src="../js/public.js"></script>
<script type="text/javascript">

    var person = JSON.parse(sessionStorage.getItem("person"));
    if (person==''||person==null) {
        alert('请先登录')
        window.location.href='denglu.html';
    } else{
        var userId = person.userid;
    }






    var id = location.href.split('?')[1];
    console.log(id)
    //我的项目列表
    $.ajax({
        type: "get",
        url:"http://114.112.96.184:18080/view/pb/"+id,
        data:{'userId':userId},
        error: function(request) {
            console.log("Connection error");
        },
        success: function(data) {
            console.log(data)
            var objPb = data.result.pb;
            var createTime='';
            createTime=objPb.createTime.substring(0,4);
            $('.Pblogo').attr('src',objPb.logo);
            var pbName =''+objPb.pbName+' <small>'+objPb.area+'·'+createTime+'</small>'
            $('.media-body.pbIntroduce h4').html(pbName);
            $('.media-body.pbIntroduce p').html(objPb.company);

            var field = objPb.domain.split(',');
            var fieldHtlm = '';
            for(i=0;i<field.length;i++){
                fieldHtlm+=  '<span class="label label-danger">'+ field[i]+'</span>'
            }
            $('.media-body.pbIntroduce').append(fieldHtlm)

            var yixing='';
            if (objPb.yixing==1){
                yixing='熠星项目'
            }else {
                yixing='非熠星项目'
            }
            $('#introduce small:eq(0)').html(yixing);
            var status='';
            if (objPb.status==0){
                status='正在审核中'
            }else if(objPb.status==-1){
                status='审核失败'
            }else{
                status='审核通过'
            }
            var attention='';
            if (objPb.status==40) {
                attention='已投资'
            } else{
                attention='投资'
            }
            $('.attentionPb').text(attention);
            $('#introduce small:eq(1)').html(status);
            var pbDetailContent='';
            pbDetailContent= '<li><h4>概述</h4>'+
                    '<p>'+objPb.summary+'</p>'+
                    '<div class="panel_name">公司全称：<span>'+objPb.company+'</span></div>'+
                    '</li>'+
                    '<li><h4>详细介绍</h4><section>产品服务</section>'+
                    '<p>'+objPb.synopsis+ '</p>'+
                    '</li>'+
                    '<li><h4>团队人数</h4>'+
                    '<section>'+objPb.personNum+ '</section>'+
                    '</li>'+
                    '<li> <h4>技术关键字</h4>'+
                    '<section>'+ objPb.keyword+ '</section>'+
                    '</li>'+
                    '<li> <h4>融资阶段</h4>'+
                    '<section>'+objPb.financingStage+'</section>'+
                    '</li>'+
                    '<li class="businessPlan"> <h4>商业计划书</h4>'+
                    '<section> <a href="'+ objPb.businessPlan+'" download="">点击下载</a></section>'+
                    '</li>'

            if(objPb.pptFile){
                pbDetailContent+='<li class="pptFile"> <h4>熠星ppt介绍</h4>'+
                        '<section> <a href="'+ objPb.pptFile+'" >在线查阅</a></section>'+
                        '</li>'
            }
            $('.pptFile a').media()

            if(objPb.videoFile){
                pbDetailContent+='<li class="videoFile"> <h4>熠星视频介绍</h4>'+
                        '<video id="videoFile" class="video-js vjs-default-skin" controls preload="none" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" data-setup="{}">'+
                        '<source src="'+objPb.videoFile+'" type="video/mp4" />'+
                        '<source src="'+objPb.videoFile+'" type="video/webm"" />'+
                        '<source src="'+objPb.videoFile+'" type="video/ogg" />'+
                        '<track kind="captions" src="demo.captions.vtt" srclang="en" label="English"/>'+
                        '<track kind="subtitles" src="demo.captions.vtt" srclang="en" label="English"/>'+
                        '</video>'+
                        '</li>';
                //视频在线播放
                var myPlayer = videojs('videoFile');
                videojs("videoFile").ready(function(){
                    var myPlayer = this;
                    myPlayer.play();
                });


            }

            $('#pbDetailList').html(pbDetailContent)
            if(!objPb.company){
                $('.panel_name').hide();
            }

            if(objPb.open==0){
                $('.businessPlan').hide();
            }
        }




    });

    $('.businessPlan a:eq(0)').media();

    function onErrorHandle(obj){
        obj.src="../img/defaultAvatar.png";
    }

    //投资项目
    $(document).on('click','#investPb',function () {

        if (person==''||person==null) {
            window.location.href='denglu.html';
            return;
        }


        if($('.attentionPb').text()=='投资'){
            attentionPb();

        }else {

            return false;
        }


        function attentionPb() {
            var money = $('#money').val();
            var stage = $('#stage').val();
            if(!money){
                alert('项目金额不能为空');
                return false;
            }
            $.ajax({
                type: "post",
                data:{'userId':userId,'money':money,'stage':stage},
                url:"http://114.112.96.184:18080//invest/"+ id +"/resolve",
                error: function(request) {
                    console.log("Connection error");
                },
                success: function(data) {
                    console.log(data);
                    $('.attentionPb').text('已投资')
                }
            });
        }

    });

    //          项目阶段
    $.ajax({
        type: "get",
        url:"http://114.112.96.184:18080/dict/startupStage",
        async: false,
        error: function(request) {
            console.log("Connection error");
        },
        success: function(data) {
            console.log(data)
            var obj = data.result;
            var htmls='';
            for (var i = 0; i < obj.length;i++) {
                htmls+= "<option value=" + obj[i].id +" >"+ obj[i].value  +"</option>"
            }
            $('#stage').html(htmls);
        }
    });
</script>
</html>
